﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ASteroids
{
    public abstract class Weapon
    {
        //behavior
        protected string audioName;
        protected float rateOfFire;
        protected int damage;
        protected bool autoFire;
        protected int collisionRadius;
        protected float bulletSpeed;
        protected Rectangle thumbNail;

        //graphics
        protected Rectangle initialFrame;
        protected int frameCount;

        public Weapon(float rateOfFire, string audioName, int damage, bool autoFire, int collisionRadius, float bulletSpeed, int x, int y, int width, int height, int frameCount, int thumbNailX, int thumbNailY)
        {
            this.audioName = audioName;
            this.rateOfFire = rateOfFire;
            this.damage = damage;
            this.autoFire = autoFire;
            this.collisionRadius = collisionRadius;
            this.bulletSpeed = bulletSpeed;

            this.initialFrame = new Rectangle(x,y,width,height);
            this.frameCount = frameCount;

            this.thumbNail = new Rectangle(thumbNailX, thumbNailY,64,64);
        }

        public string AudioName
        {
            get { return this.audioName; }
            set { this.audioName = value; }
        }

        public float RateOfFire
        {
            get { return this.rateOfFire; }
            set { this.rateOfFire = value; }
        }

        public int Damage
        {
            get {return this.damage;}
            set {this.damage = value;}
        }

        public bool AutoFire
        {
            get {return this.autoFire;}
            set { this.autoFire = value; }
        }

        public Rectangle InitialFrame
        {
            get { return this.initialFrame; }
            set { this.initialFrame = value; }
        }

        public int FrameCount
        {
            get { return this.frameCount; }
            set { this.frameCount = value;}

        }

        public int CollisionRadius
        {
            get { return this.collisionRadius; }
            set { this.collisionRadius = value; }
        }
        public float BulletSpeed
        {
            get { return this.bulletSpeed; }
            set { this.bulletSpeed = value; }
        }
        public Rectangle ThumbNail {
            get { return this.thumbNail; }
            set { this.thumbNail = value; }
        }

    }
}
